package com.ipartek.pruebas.bbddaccessP1;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;

public class OBDCDAOFactoryP1 extends DAOFactoryP1{

	public OBDCDAOFactoryP1() {
		try{
		Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
		}catch(ClassNotFoundException e){
			e.printStackTrace();
		}
	}
	
	public static Connection getConnection(){
		Connection con = null;
		try{
			
			con = DriverManager.getConnection("jdbc:odbc:prueba", "", "");
			
		}catch(SQLException e){
			e.printStackTrace();
		}
		return con;
	}
	
	@Override
	public AlumnoDAOP1 getAlumno() {
		return new AlumnoOBDDACDAOP1();
	}

	@Override
	public CursoDAOP1 getCurso() {
		return new CursoOBDCDAOP1();
	}

}
